#itkang/centos:java
#version 0.01
FROM centos
MAINTAINER itkang "itkang@126.com"
RUN yum install -y openssh openssh-server openssh-clients
RUN mkdir /var/run/sshd
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN /bin/echo 'root:itkang.com' |chpasswd
RUN useradd admin
RUN /bin/echo 'admin:itkang.com' |chpasswd
RUN /bin/sed -i 's/.*session.*required.*pam_loginuid.so.*/session optional pam_loginuid.so/g' /etc/pam.d/sshd
RUN /bin/echo -e "LANG=\"en_US.UTF-8\"" > /etc/default/local
RUN yum install -y git
RUN yum install java-1.8.0-openjdk -y
EXPOSE 22
CMD /usr/sbin/sshd -D
